﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CateList.aspx.cs" Inherits="Sdepci.InfoCode.Web.CodeIndex.CateList" %>
<%@ Register src="../Includes/VerifyLoginState.ascx" tagname="VerifyLoginState" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>编码索引设置</title>
    <link rel="stylesheet" type="text/css" href="../Css/Style.css" />
    <link rel="stylesheet" type="text/css" href="../Css/Backstage.css" />
    <script type="text/javascript" src="../Javascript/Tree.js"></script>
    <script language="javascript" type="text/javascript">
    function SetHeight()
    {
        document.getElementById("cate").style.height = document.documentElement.clientHeight - 58 + "px";
        document.getElementById("catetree").style.height = document.documentElement.clientHeight - 58 - 25 + "px";
        document.getElementById("dict").style.height = document.documentElement.clientHeight - 58 + "px";
    }

    // 窗口大小变化时重置界面
    window.onresize = SetHeight;

    function ShowTree()
    {
        imagesDir = "../Images/Tree/";
        affect = "catetree";
        icon = false;
        InitTreeXml();
        NodeAllExpand(rootNode);
    }
    
    function OpenAdd(parentCateGuid)
    {
        var result = window.showModalDialog("CateEdit.aspx?ParentCateGuid=" + parentCateGuid, window, "dialogWidth:650px;dialogHeight:350px");
        if (result != undefined && result == true)
        {
            document.location = "CateList.aspx";
        }
    }

    function OpenEdit(cateGuid)
    {
        var result = window.showModalDialog("CateEdit.aspx?CateGuid=" + cateGuid, window, "dialogWidth:650px;dialogHeight:350px");
        if (result != undefined && result == true)
        {
            document.location = "CateList.aspx";
        }
    }

    function OpenDelete(cateGuid)
    {
        var result = window.showModalDialog("CateDelete.aspx?CateGuid=" + cateGuid, window, "dialogWidth:550px;dialogHeight:240px");
        if (result != undefined && result == true)
        {
            document.location = "CateList.aspx";
        }
    }
    </script>
</head>
<body onload="javascript:SetHeight();ShowTree();" style="overflow: hidden;">
    <form id="form1" runat="server">
    <uc1:VerifyLoginState ID="VerifyLoginState1" runat="server" />
    <div id="container">
        <div style="background-color: #9fcfcf; height: 15px; padding: 5px 0px 5px 0px; margin: 0px auto 5px auto; color: #ffffff; font-weight: bold;">
            编码索引设置
        </div>
        <div id="cate" style="float: left; border: solid 1px #9fcfcf; width: 34%; height: 300px;">
            <div style="background-color: #9fcfcf; height: 15px; padding: 5px 0px 5px 0px; color: #ffffff; font-weight: bold; text-align: center;">
                索引列表<img style="width: 20px; height: 20px; cursor: pointer; vertical-align: middle;" src="../Images/add.gif" onclick="javascript:OpenAdd('0');" alt="增加" title="增加一级索引" />
            </div>
            <div id="catetree" style="width: 100%; height: 275px; text-align: left; overflow: auto;">
                <div id="root_child">载入中...</div>
            </div>
        </div>
        <div id="dict" style="float: right; border: solid 1px #9fcfcf; width: 64%; height: 300px;">
            <iframe id="dictframe" src="" style="width: 100%; height: 100%" frameborder="0" scrolling="auto"></iframe>
        </div>
    </div>
    </form>
</body>
</html>
